#pragma once
#include <cv.h>
#include <highgui.h>
#include <cxcore.h>
#include <cvaux.h>
//#include <ctime>
#include <iostream>
#include <sstream>
#include <stdio.h>
#include "DBConnect.h"



 using namespace std;

//using namespace std;
class SIFTFeature
{
private:
        int id;
        char* cameraIp;
        float* siftFeatures;
        int noOfSIFTFeatures;
        int discriptorSize;
        IplImage* snapshot;
        time_t timeStamp; 
        
        

public:
    SIFTFeature(void);
    SIFTFeature(int id,char* cameraIp,float* siftFeatures,int noOfSIFTFeatures,int discriptorSize,IplImage* snapshot,time_t timeStamp);
    bool saveToDB(DBConnect* dbConnect);
    bool loadById(DBConnect* dbConnect,int id);    
    
    string getSerializedSIFTFeatures(float* siftFeatures,int dimentionsLength);	
	float* getDeSeraializedSIFTFeatures(const char* str, int length);
    virtual ~SIFTFeature(void);
};